import java.util.Scanner;

public class Prime {
    public static void main(String[] args) {
        //给定一个数字，判定一个数字是否是素数
        int n = 0;
        int i = 0;
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的判断的数字：");
        n = scanner.nextInt();
        for ( i = 2; i <= Math.sqrt((double) n); i++) {
            if(n % i == 0){
                System.out.println("不是素数");
                break;
            }
        }
        if(i > Math.sqrt((double)n)){
            System.out.println("是素数");
        }
    }
}
